package com.homework1;

public class Test {
    public static void main(String[] args) {
        Person[] persons = new Person[2];
        persons[0] = new Man();
        persons[1] = new Woman();
        for (int i = 0; i < persons.length; i++) {
            persons[i].eat();
        }
    }
}
